<?php

namespace app\http\middleware;

class TokenCheck
{
    public function handle($request, \Closure $next)
    {
    	// if (empty($request->param('token'))) {
    	// 	error_log("not token find")
     //    return redirect('index/think');
     //  }
     //  elseif(isset($request->param('wx_pid')))
     //  {
     //  	error_log("wx_pid setted")
     //    return redirect('index/think');
     //  	//change token to wx_pid
     //  }
     //  else{
     //  	//TODO: change token to player id
     //  	$request->param('wx_pid') = "test";
     //  }
        // record type: input
        trace('get_request:'.json_encode($request),'input');
        return $next($request);
    }
}
